package com.example.blog.service;

import com.example.blog.entity.Article;
import com.example.blog.entity.User;
import java.util.List;

public interface ArticleService {

    Article createArticle(Article article, User user);

    Article updateArticle(Article article);

    void deleteArticle(Long id);

    Article findById(Long id);

    List<Article> findByUser(User user);

    List<Article> findByUserId(Long userId);

    List<Article> findAll();

    List<Article> findAllOrderByCreateTimeDesc();

    List<Article> searchByTitle(String keyword);

    List<Article> findByCategoryId(Long categoryId);

    Article increaseViewCount(Long id);

    Article increaseLikeCount(Long id);

}